﻿
namespace CSharpBorderlessForm;


class MyAppContext : ApplicationContext
{
    Win32WindowCore _win32BorderlessWindow;
    public MyAppContext()
    {
        _win32BorderlessWindow = new Win32WindowCore();

        _win32BorderlessWindow.Closed += OnMainFormClosed;
    }

    protected override void OnMainFormClosed(object? sender, EventArgs e)
    {
        ExitThread();
    }
}

internal static class Program
{
    /// <summary>
    ///  The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
        // To customize application configuration such as set high DPI settings or default font,
        // see https://aka.ms/applicationconfiguration.
        ApplicationConfiguration.Initialize();
        Application.Run(new MyAppContext());
    }
}